import request from "@/utils/request";

/**
 * 分页查询分类
 * @param param
 * @returns {AxiosPromise}
 */
export function page(param) {
    return request({
        url: '/category/page',
        method: 'get',
        params: param
    })
}

/**
 * 删除分类
 * @param uuid
 * @returns {AxiosPromise}
 */
export function deleted(uuid){
    return request({
        url: '/category/delete/' + uuid,
        method : 'delete'
    })
}

/**
 * 添加板块
 * @param uuid
 * @returns {AxiosPromise}
 */
export function add(param){
    return request({
        url: '/category/add',
        method : 'post',
        data: param
    })
}

/**
 * 修改板块
 * @param uuid
 * @returns {AxiosPromise}
 */
export function update(param){
    return request({
        url: '/category/update/' + param.uuid,
        method : 'put',
        data: param
    })
}
